#ifndef WALL_H
#define WALL_H
//------------------------------------------------------------------------
//
//  Name:   Wall2D.h
//
//  Desc:   class to create and render 2D walls. Defined as the two 
//          vectors A - B with a perpendicular normal. 
//          
//
//  Author: Mat Buckland (fup@ai-junkie.com)
//
//------------------------------------------------------------------------
#include "Vector2D.h"


struct Wall2D 
{
	Vector2D    m_vA,
              m_vB,
              m_vN;

	void CalculateNormal()
	{
		Vector2D temp = Vec2DNormalize(m_vB - m_vA);
		m_vN.x = -temp.y;
		m_vN.y = temp.x;
	}
	Wall2D(){};
	Wall2D(Vector2D A, Vector2D B):m_vA(A), m_vB(B)
	{
		CalculateNormal();
	}

	Wall2D(Vector2D A, Vector2D B, Vector2D N):m_vA(A), m_vB(B), m_vN(N)
	{ }
	Vector2D Normal()const{return m_vN;}
};

#endif